if(GPL)
    file(GLOB mltplusgpl_src *.c)
    add_library(mltplusgpl MODULE ${mltplusgpl_src})
    set(mltplusgpl_lib mlt m Threads::Threads)
    if(WIN32)
        list(APPEND mltplusgpl_lib ws2_32)
    elseif(UNIX)
        list(APPEND mltplusgpl_lib rt)
    endif()
    target_link_libraries(mltplusgpl ${mltplusgpl_lib})
    # Create module in parent directory, for the benefit of "source setenv".
    set_target_properties(mltplusgpl PROPERTIES LIBRARY_OUTPUT_DIRECTORY ..)
    install(TARGETS mltplusgpl LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/mlt)
    file(GLOB yml *.yml)
    install(FILES ${yml} DESTINATION ${CMAKE_INSTALL_DATADIR}/mlt/mltplusgpl)
endif()
